package com.shadow.domain;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by qq65827 on 2015/1/26.
 */
@Entity
@Table(name = "issue")
public class Issue extends BaseObject  {

    public Issue() {
    }

    public Issue(String name, String comment) {
        this.name = name;
        this.comment = comment;
    }


    public Issue(String name, String comment, String tags) {
        this.name = name;
        this.comment = comment;
        this.tags = tags;
    }


    @Column(name = "f_name")
    private String name;
    @Column(name = "f_priority")
    private String priority;
    @Column(name = "f_comment")
    private String comment;
    @Column(name = "f_status")
    private String status;

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    @Column(name = "f_tags")

    private String tags;
    @Column(name = "f_author")
    private String author;

    @OneToMany(fetch = FetchType.LAZY, mappedBy = "issue")
    @OrderBy(value = "id ASC")
    private Set<IssueResource> issueResources= new HashSet<>(0);


    public Set<IssueResource> getIssueResources() {
        return this.issueResources;
    }


    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }


}
